import 'package:flutter/material.dart';

class ImageHelper {
  static String png(String name) {
    return "assets/images/$name.png";
  }

  static String getImageJPEG(String name) {
    return "assets/images/$name.jpeg";
  }

  static Widget loadAssetsImageJPEG(String name, {double width, double height, Color color}) {
    return Image.asset(
      getImageJPEG(name),
      width: width,
      height: height,
      fit: BoxFit.cover,
      color: color,
    );
  }
  static Widget loadAssetsImagePNG(String name, {double width, double height, Color color}) {
    return Image.asset(
      png(name),
      width: width,
      height: height,
      fit: BoxFit.cover,
      color: color,
    );
  }

  static Widget loadAssetsImage2(String name, {double width, double height, BoxFit boxFit, Color color}) {
    return Image.asset(
      getImageJPEG(name),
      width: width,
      height: height,
      fit: boxFit,
      color: color,
    );
  }

  static String placeHolder() {
    return "assets/images/bg_image_placeholder.png";
  }
}